<template>
  <div style="margin-top: 20px">
    <el-form ref="formRef" label-width="150px" :model="form" :rules="rules">
      <el-form-item label="最大运输数量（夹爪数）" prop="GipperCount">
        <el-input v-model="form.GipperCount" />
      </el-form-item>
    </el-form>
    <div class="pay-button-group">
      <el-button @click="handleSubmit1">上一步</el-button>
      <el-button type="primary" @click="handleSubmit">下一步</el-button>
    </div>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        formRef: null,
        form: {
          GipperCount: '',
        },
        rules: {
          GipperCount: [
            { required: true, message: '请输入最大运输数量', trigger: 'blur' },
          ],
        },
        loading: false,
      }
    },
    mounted() {},
    methods: {
      handleSubmit1() {
        this.$emit('change-step', 0)
      },
      handleSubmit() {
        this.$refs['formRef'].validate((valid) => {
          if (valid) {
            this.$emit('change-step', 5, { TransportInfo: this.form })
          } else {
            this.loading = false
          }
        })
      },
    },
  }
</script>

<style lang="scss" scoped>
  .pay-button-group {
    display: block;
    margin: 20px auto;
    text-align: center;
  }
</style>
